<h2>Why is this an issue?</h2>
<p><code>GoTo</code> is an unstructured control flow statement. It makes code less readable and maintainable. Structured control flow statements such
as <code>If</code>, <code>For</code>, <code>While</code>, or <code>Exit</code> should be used instead.</p>
<h3>Noncompliant code example</h3>
<pre>
    Sub GoToStatementDemo()
        Dim number As Integer = 1
        Dim sampleString As String
        ' Evaluate number and branch to appropriate label.
        If number = 1 Then GoTo Line1 Else GoTo Line2
Line1:
        sampleString = "Number equals 1"
        GoTo LastLine
Line2:
        ' The following statement never gets executed because number = 1.
        sampleString = "Number equals 2"
LastLine:
        ' Write "Number equals 1" in the Debug window.
        Debug.WriteLine(sampleString)
    End Sub
</pre>
<h3>Compliant solution</h3>
<pre>
    Sub GoToStatementDemo()
        Dim number As Integer = 1
        Dim sampleString As String
        ' Evaluate number and branch to appropriate label.
        If number = 1 Then
            sampleString = "Number equals 1"
        Else
            sampleString = "Number equals 2"
        End If
        Debug.WriteLine(sampleString)
    End Sub
</pre>

